import Vue from 'vue'
import VueRouter from 'vue-router'
import clientManagement from '../views/clientManagement/clientManagement'
import login from '../views/login/login'
import vuex from '../views/vuex/vuex'
import test from '../views/test/Test'
import mast from '../views/mast/mast'
import elementUI from '../views/elementUI/elementUI'
import App from '../App'

Vue.use(VueRouter)
const routes = [{
    path: '/',
    name: '客户管理🙂',
    component: clientManagement,
    // redirect:'/'
}, {
    path: '/login',
    name: 'login',
    component: login,
    // redirect:'/'
}, {
    path: '/vuex',
    name: 'vuex',
    component: vuex,
    // redirect:'/'
}, {
    path: '/test',
    name: 'test',
    component: test,
    // redirect:'/'
}, {
    path: '/mast',
    name: 'mast',
    component: mast,
    // redirect:'/'
}, {
    path: '/elementUI',
    name: 'elementUI',
    component: elementUI,
    // redirect:'/'
}, ]

const router = new VueRouter({
    routes
})

// const originalPush = VueRouter.prototype.push;
// VueRouter.prototype.push = function push(location) {
//     return originalPush.call(this, location).catch(err => err);
// };

export default router